<div id="sidebar">
  <div id="sidebar-wrapper">
    <h1 id="sidebar-title"><a href="{/$root_dir/}/">{/$head_title/}</a></h1>
    <a href="{/$root_dir/}/"><img id="logo" src="{/$root_dir/}/assets/simpla/images/logo.png" alt="{/$head_title/}" /></a> 
    <!-- Sidebar Profile links -->
    <div id="profile-links"> 您好, <a href="#" title="编辑资料">{/$_adminname/}</a><br />
      <br />
      <a href="{/get_url rule="/system/index"/}" title="管理首页">管理首页</a> | <a href="{/get_url rule="/main/logout"/}" title="退出系统">退出系统</a> </div>
    <ul id="main-nav">
	{/if $menu.category/}
      <li> <a href="javascript:;" class="nav-top-item {/if $inpath[1] eq "category"/}current{//if/}">分类管理</a>
        <ul>
            {/foreach from=$menu.category item=items key=k/}
            <li><a href="{/get_url rule='/category/'/}{/$k/}" class="{/if $inpath[2] eq $k/}current{//if/}">{/$items/}</a></li>
            {//foreach/}
        </ul>
      </li>
	{//if/}
	{/if $menu.goods/}
      <li> <a href="javascript:;" class="nav-top-item {/if $inpath[1] eq "goods"/}current{//if/}">商品管理</a>
        <ul>
            {/foreach from=$menu.goods item=items key=k/}
            <li><a href="{/get_url rule='/goods/'/}{/$k/}" class="{/if $inpath[2] eq $k/}current{//if/}">{/$items/}</a></li>
            {//foreach/}
        </ul>
      </li>
	{//if/}
	{/if $menu.purchase/}
      <li> <a href="javascript:;" class="nav-top-item {/if $inpath[1] eq "purchase"/}current{//if/}">进货管理</a>
        <ul>
            {/foreach from=$menu.purchase item=items key=k/}
            <li><a href="{/get_url rule='/purchase/'/}{/$k/}" class="{/if $inpath[2] eq $k/}current{//if/}">{/$items/}</a></li>
            {//foreach/}
        </ul>
      </li>
	{//if/}
	{/if $menu.sales/}
      <li> <a href="javascript:;" class="nav-top-item {/if $inpath[1] eq "sales"/}current{//if/}">出货管理</a>
        <ul>
            {/foreach from=$menu.sales item=items key=k/}
            <li><a href="{/get_url rule='/sales/'/}{/$k/}" class="{/if $inpath[2] eq $k/}current{//if/}">{/$items/}</a></li>
            {//foreach/}
        </ul>
      </li>
	{//if/}
	{/if $menu.statistics/}
      <li> <a href="javascript:;" class="nav-top-item {/if $inpath[1] eq "statistics"/}current{//if/}">统计管理</a>
        <ul>
            {/foreach from=$menu.statistics item=items key=k/}
            <li><a href="{/get_url rule='/statistics/'/}{/$k/}" class="{/if $inpath[2] eq $k/}current{//if/}">{/$items/}</a></li>
            {//foreach/}
        </ul>
      </li>
	{//if/}
	{/if $menu.account/}
      <li> <a href="javascript:;" class="nav-top-item {/if $inpath[1] eq "account"/}current{//if/}">帐号管理</a>
        <ul>
            {/foreach from=$menu.account item=items key=k/}
            <li><a href="{/get_url rule='/account/'/}{/$k/}" class="{/if $inpath[2] eq $k/}current{//if/}">{/$items/}</a></li>
            {//foreach/}
        </ul>
      </li>
	{//if/}
	{/if $menu.member/}
      <li> <a href="javascript:;" class="nav-top-item {/if $inpath[1] eq "member"/}current{//if/}">会员管理</a>
        <ul>
            {/foreach from=$menu.member item=items key=k/}
            <li><a href="{/get_url rule='/member/'/}{/$k/}" class="{/if $inpath[2] eq $k/}current{//if/}">{/$items/}</a></li>
            {//foreach/}
        </ul>
      </li>
	{//if/}
	{/if $menu.system/}
      <li> <a href="javascript:;" class="nav-top-item {/if $inpath[1] eq "system"/}current{//if/}">系统</a>
        <ul>
            {/foreach from=$menu.system item=items key=k/}
            <li><a href="{/get_url rule='/system/'/}{/$k/}" class="{/if $inpath[2] eq $k/}current{//if/}">{/$items/}</a></li>
            {//foreach/}
        </ul>
      </li>
	{//if/}
    </ul>
  </div>
</div>
